1. Field of the Invention
The present invention relates to digital graphics systems. More specifically, the present invention relates to methods and circuits for applying error diffusion dithering.
2. Discussion of Related Art
Analog video displays such as cathode ray tubes (CRTs) dominate the video display market. Thus, most electronic devices that require video displays, such as computers and digital video disk players, output analog video signals. As is well known in the art, an analog video display sequentially reproduces a large number of still images to give the illusion of full motion video. Each still image is known as a frame. For NTSC television, which is interlaced, 30 whole frames (i.e. 30 even fields and 30 odd fields) are displayed in one second. For computer applications, the number of frames per seconds is variable with typical values ranging from 56 to 100 frames per seconds.
FIG. 1(a) illustrates a typical analog video display 100. Analog video display 100 comprises a raster scan unit 110 and a screen 120. Raster scan unit 110 generates an electron beam 111 in accordance with an analog video signal VS, and directs electron beam 111 against screen 120 in the form of sequentially-produced horizontal scanlines 101–109, which collectively form one frame. Screen 120 is provided with a phosphorescent material that is illuminated in accordance with the video signal VS transmitted in electron beam 111 to produce contrasting bright and dark regions that create an image, such as the diamond shape shown in FIG. 1(c). After drawing each scanline 101–108, raster scan unit 110 performs a horizontal flyback 130 to the left side of screen 120 before beginning a subsequent scanline. Similarly, after drawing the last scanline 109 of each frame, raster scan unit 110 performs a vertical flyback 131 to the top left corner of screen 120 before beginning a subsequent frame. To avoid generating an unwanted flyback traces (lines) on screen 120 during horizontal flyback 130, video signal VS includes a horizontal blanking pulse that turn off electron beam 111 during horizontal flyback 130. Similarly, during vertical flyback 131, video signal VS includes a vertical blanking pulse that turns off electron beam 111 during vertical flyback 131.
Digital video display units, such as liquid crystal displays (LCDs), are becoming competitive with analog video displays. Typically, digital video display units are much thinner and lighter than comparable analog video displays. Thus, for many video display functions, digital video displays are preferable to analog video displays. For example, a 19 inch (measured diagonally) analog video display, which has a 17 inch viewable area, may have a thickness of 19 inches and weigh 80 pounds. However, a 17 inch digital video display, which is equivalent to a 19 inch analog video display, may be only 4 inches thick and weigh less than 15 lbs. However, most computer systems are designed for use with analog video displays. Thus, the analog video signal provided by a computer must be converted into a format compatible with digital display systems.
FIG. 1(b) illustrates a typical analog video signal VS for analog video display 100. Video signal VS is accompanied by a horizontal synchronization signal HSYNCH and a vertical synchronization signal VSYNCH (not shown). Vertical synchronization signal VSYNCH contains vertical synch marks to indicate the beginning of each new frame. Typically, vertical synchronization signal VSYNCH is held at logic high and each vertical synch mark is a logic low pulse. Horizontal synchronization signal HSYNCH contains horizontal synch marks (logic low pulses) 133, 134, and 135 to indicate the beginning of data for a new scanline. Specifically, horizontal synch mark 133 indicates video signal VS contains data for scanline 103; horizontal synch mark 134 indicates video signal VS now contains data for scanline 104; and horizontal synch mark 135 indicates video signal VS now contains data for scanline 105.
Video signal VS comprises data portions 112, 113, 114, and 115 that correspond to scanlines 102, 103, 104, and 105, respectively. Video signal VS also comprises horizontal blanking pulses 123, 124 and 125, each of which is located between two data portions. As explained above, horizontal blanking pulses 123, 124, and 125 prevent the electron beam from drawing unwanted flyback traces on analog video display 100. Each horizontal blanking pulse comprises a front porch FP, which precedes a horizontal synch mark, and a back porch BP which follows the horizontal synch mark. Thus, the actual video data for each row in video signal VS lies between the back porch of a first horizontal blanking pulse and the front porch of the next horizontal blanking pulse.
FIG. 1(c) illustrates a typical digital display 150. Digital display 150 comprises a grid of picture elements (“pixels”) divided into rows 151–159 and columns 161–174. Each data portion (e.g. data portions 112, 113, 114, and 115) is treated as one row of a digital display. Each data portion is also divided into smaller portions and digitized to form pixel data that is transmitted to its designated pixel using row driver 180 and column driver 190. Typically, digital pixel data is given in RGB format, i.e., red-green-blue, which provides the amount of red, green, and blue intensity for the pixel. In video applications, YUV format is often used for both digital and analog video streams. Expensive digital displays can have 256 shades of red, 256 shades of green and 256 shades of blue in each pixel. Thus, each color is represented by 8 bits of data and each pixel can have display 16,777,216 colors. However, some lower cost digital displays cannot display that many colors. For example, many digital displays only use 6 bits of data for red, green, and blue.
To create a digital display from an analog video signal, the analog video signal must be digitized at precise locations to form the pixels of a digital display. Furthermore, the YUV format of the analog video stream is typically converted into RGB format for the digital display. Conversion of analog video signals to digital video signals are well known in the art and thus not described herein.
Generally, the digital data stream is processed using as much color depth as possible. Such processing may include noise reduction, edge enhancement, scaling (interpolation or decimation), sharpness enhancement, color management, gamma correction, etc. Then depending on the color depth of the digital display, the digital data stream is reduced to the color depth of the display system. As illustrated in FIG. 2, a conventional color depth adjustment unit 220 converts an RGB input signal RGB_I(8,8,8) into an RGB output signal RGB_O(6,6,6), which uses only 6 bits of data for red, green, and blue, for digital display unit 230. Color depth adjustment unit 220 includes a frame buffer 225 and an error diffusion unit 227. Frame buffer 225 is used to store the images of RGB input signal RGB_I(8,8,8) so that error diffusion unit 227 can apply an error diffusion mask to the images. Error diffusion is a well known in art for use in color depth adjustment. For high resolution images, frame buffer 225 is quite large and expensive. Hence there is a need for a system and method to perform color depth adjustment without requiring large frame buffers.